#include <string>
#include <map>
#include <vector>
using namespace std;

typedef map<string, string>::value_type valType;

class IpaConverter{
private:
	map<string, string> container;
	string tokenize(const string& str,vector<string>& tokens,
                const string& delimiters = " ");
public:
	IpaConverter() {
		container.insert(map<string, string>::value_type("^", "ah"));//
		container.insert(valType("a:", "aa"));//
		container.insert(valType("@", "ae"));//
		container.insert(valType("e", "ax"));//
		// container.insert(valType("e", "eh"));
		container.insert(valType("e:", "er"));//
		container.insert(valType("i", "ih"));//
		container.insert(valType("i:", "iy"));//
		container.insert(valType("o:", "ao"));//
		container.insert(valType("u", "uh"));//
		container.insert(valType("u:", "uw"));//
		container.insert(valType("ai", "ay"));//
		container.insert(valType("au", "aw"));//
		container.insert(valType("Ou", "ow"));//
		container.insert(valType("ei", "ey"));//
		container.insert(valType("oi", "oy"));//
		container.insert(valType("b", "b"));//
		container.insert(valType("d", "d"));//
		container.insert(valType("f", "f"));//
		container.insert(valType("g", "g"));//
		container.insert(valType("h", "h"));//
		container.insert(valType("j", "y"));//
		container.insert(valType("k", "k"));//
		container.insert(valType("l", "l"));//
		container.insert(valType("m", "m"));//
		container.insert(valType("n", "n"));//
		container.insert(valType("N", "ng"));//
		container.insert(valType("P", "p"));//
		container.insert(valType("r", "r"));//
		container.insert(valType("s", "s"));//
		container.insert(valType("S", "sh"));//
		container.insert(valType("t", "t"));//
		container.insert(valType("tS", "ch"));//
		container.insert(valType("th", "th"));//
		container.insert(valType("TH", "dh"));//
		container.insert(valType("v", "v"));//
		container.insert(valType("w", "w"));//
		container.insert(valType("z", "z"));//
		container.insert(valType("Z", "zh"));//
		container.insert(valType("dZ", "jh"));//
	}
	string getValue(string key);
	string convertStrToPronXML(vector<string>::const_iterator beg,
		vector<string>::const_iterator end);
};